package com.itheima.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.itheima.entity.PageResult;
import com.itheima.entity.QueryPageBean;
import com.itheima.service.OrderService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 体检预约管理
 */
@RestController
@RequestMapping("/orderManage")
public class OrderManageController {
    @Reference
    public OrderService orderService;

    @RequestMapping("/findPage")
    public PageResult findPage(@RequestBody QueryPageBean queryPageBean) {
        PageResult pageResult = orderService.findPage(queryPageBean.getCurrentPage()
                , queryPageBean.getPageSize()
                , queryPageBean.getQueryString());
        return pageResult;
    }
}
